package tmp;

import cacco.jp.mld.panel.util.PropertiesUtil;


public abstract class CronAbstract {
 
  public static final int STATUS_ON        = 0;
  public static final int STATUS_OFF       = 1;
  public static final int STATUS_UPDATE    = 2;
  public static final int STATUS_DELETED   = 3;
  
  protected String url;
  protected String schedule;
  protected int id;
  protected int status;
 
  
  
  
  public String getSchedule() {
		return schedule;
	}
	public void setSchedule(String schedule) {
		this.schedule = schedule;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public String getGroup(){
		if(url.contains("api")){
			return PropertiesUtil.getProperty("cron.group.1");
		}else if (url.contains("panel")){
			return PropertiesUtil.getProperty("cron.group.2");
		}else{
			return PropertiesUtil.getProperty("cron.group.3");
			
		}
	}
	
}

